<!--
/**************************************************
* @(#)top.jsp
*
* Copyright (c) 2005 Hitrust Technology Inc.
* Developed by SDC, Hitrust.
* All Rights Reserved.
*
* Modify History:
*  v1.00, 2005/12/05, SDC 
*  1) first release
*  v1.01, 2005/12/08, brent 
*  1) add 修改密码、退出登录
*  v1.02, 2005/12/13, brent 
*  1) modify 退出登录时增加提示
*  v1.03, 2005/12/13, Kevin
   1) add 显示公告
/**************************************************
-->
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page autoFlush="true" %>
<HTML>
<HEAD><TITLE>集中采购系统-框架头页面</TITLE>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> 
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> 
<LINK href="css/caigouxitong.css"" type=text/css rel=stylesheet>
<META HTTP-EQUIV="Expires" CONTENT="0"> 
<LINK href="css/css.css" type=text/css rel=stylesheet>
<%@ include file="common.jsp" %>
<%
	ArrayList tMenus = (ArrayList)request.getSession().getAttribute("TreeMenu");
//	HashMap tMap = (HashMap)request.getSession().getAttribute("TreeMenu");
    GSOperatorBean tUserBean = (GSOperatorBean)request.getSession().getAttribute(GSBaseConstants.LOGIN);
    String id = request.getSession().getId();
    
//	UserForm tForm = (UserForm)session.getAttribute("userForm");
    //显示公告
    ArrayList alAffi = com.hitrust.gs.util.page.TopDisplay.getAffi(); 
    ArrayList alMI = com.hitrust.gs.util.page.TopDisplay.getMarketInfo();
%>
<script language="JavaScript1.2">
<!--
   top.leftFrame.location.href="<%= response.encodeURL(request.getContextPath() + "/left.jsp") %>";
   
	function showweek()
　{	nowDate = new Date();
　　if (nowDate.getDay() == 0) return ("星期日");
　　if (nowDate.getDay() == 1) return ("星期一");
　　if (nowDate.getDay() == 2) return ("星期二");
　　if (nowDate.getDay() == 3) return ("星期三");
　　if (nowDate.getDay() == 4) return ("星期四");
　　if (nowDate.getDay() == 5) return ("星期五");
　　if (nowDate.getDay() == 6) return ("星期六");
　}

　　function showdate()
　　{

	　　var nowDate = new Date();
	　　var year = nowDate.getYear();
	　　var month = nowDate.getMonth()+1;
	　　var day = nowDate.getDate();
	　　return year+"年"+month+"月"+day+"日";
　　}

    function setMenu(i)
    {
        location.href='/left.jsp';
    }
    function control(cout,value,code){
    	var temp
    	for(var i=1; i<=cout; i++){
  			if(i==value){
				temp = "Pan" + value;    		
			    eval("parent.leftFrame.document.all." +temp+".style.display='block'");
			    if(i == 1){
					parent.contentFrame.location.href="<%=response.encodeURL(root + "/main.jsp")%>";
				}
				else{
					parent.contentFrame.location.href="<%=response.encodeURL(root + "/blank.jsp")%>";
				}
			}else{
				temp = "Pan" + i;
				eval("parent.leftFrame.document.all."+ temp+ ".style.display='none'");
			}
		}
    }
    function setFont(cout,value){
    	var temp ;
    	var iCount = parseInt(cout);
    	for(i=1; i<=parseInt(cout);i++){
    		if(i==value){
    			temp = "h"+value;
	    		eval("document.all." + temp + ".color='#CC0000'");
	    	}else{	
	    		temp = "h"+i;
	    		eval("document.all." + temp + ".color='#06582E';");
	    	}
    	}
    }
    function logOff() {
		if(confirm("是否退出系统？")) logout.submit();
	}
	function setClass(value){
		temp = "label"+value;
		alert(temp);
		eval("document.all." + temp + ".class='a01'");
	}
	function changecolor_h(id_h)
	{
	  eval(id_h+".style.color='red'");
	}	
		var clocktext;
		var sec,hr,min;

	function CurrentTime() 
	{ 
		today = new Date(); 
		sec = today.getSeconds(); 
		hr = today.getHours(); 
		min = today.getMinutes(); 

		if (hr <= 9) hr = "0" + hr; 
		if (min <= 9) min = "0" + min; 
		if (sec <= 9) sec = "0" + sec; 
		var clocktext = today.getYear() + "-" +(today.getMonth()+1) + "-" + today.getDate() + " " + hr + ":" + min + ":" + sec ; 
		clocktimer = setTimeout("CurrentTime()", 1000); 
		var showtime=document.all("time");
		showtime.innerText = clocktext; 
	} 	
//-->
</script>
</head>
<body BGCOLOR=#000064 LEFTMARGIN=0 TOPMARGIN=0 onload="CurrentTime();">
<form name="logout" method="post" action="<%=response.encodeURL(root+"/A000201.do")%>" target="_top">
</form>
<div align="center">
  <table width="1024" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td width="528"><img src="images/1-11_.GIF" width="528" height="98"></td>
            <td valign="top"  >            
               <iframe name= 'affmrkinf' width=100% height=98 frameborder=0 scrolling=no src="<%= response.encodeURL(request.getContextPath() + "/affimark.jsp") %>" ></iframe>
             </td>
          </tr>
        </table></td>
    </tr>

    <tr> 
      <td height="70" valign="top"> 
        <table width="100%" height="51%" border="0" cellpadding="0" cellspacing="0">
          <tr> 
            <td width="20%" height="75" valign="top"> 
              <table width="208" height="70%" border="0" cellpadding="0" cellspacing="0">
                <tr> 
                  <td width="100%" height="69" valign="top" background="images/1-2.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td width="7%">&nbsp;</td>
                        <td width="93%">&nbsp;</td>
                      </tr>
                      <tr> 
                        <td >&nbsp;</td>
                        <td height="20"><span class="green-135131">用户名：<%=tUserBean.getGs_oper_name()%></span> 
                        </td>
                      </tr>
                      <tr> 
                        <td>&nbsp;</td>
                        <td height="20" class="green-135131" >时间：<span id="time"></span></td>
                      </tr>
                    </table></td>
                </tr>
              </table>
            </td>
            <td width="80%" valign="top" bgcolor="F5F5F5"><table width="100%" border="0" cellspacing="0" cellpadding="0">    
                <tr>
                  <td height="26" background="images/1-6.gif" class="green-06582E" ><strong>
        <%
        	int count = tMenus.size();
        	if(tMenus != null && tMenus.size()>0){
		        //int i=0;
		        for (int i=1; i<tMenus.size()+1; i++){
		            Label tLabel = (Label) tMenus.get(i-1);
		            int length = tLabel.getFuncName().getBytes().length/2;
		            String tFuncCode = tLabel.getFuncCode().trim();
		            //i++;
		%>
	          	<a  href="#" class="link9" onClick="control('<%=count%>','<%=i%>','<%=tFuncCode%>');setFont('<%=count+1%>','<%=i%>'); "><font id="h<%=i%>" color="<%=(i==1)?"#CC0000":"06582E"%>"><%=tLabel.getFuncName()%></font></a>
	          	 | 
	    <%
	        	}
	        }
	    %>
          
          	<a href="#" onClick="setFont('<%=count+1%>','<%=count+1%>');logOff()" class="link9" ><font id="h<%=count+1%>" color="06582E">退出系统</font></a>
          	</strong>
          	</td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>

